// 月卡管理接口

import request from '@/utils/request'

// 获取月卡信息列表
export function getCardListAPI(params) {
  return request({
    url: '/parking/card/list',
    method: 'get',
    params
  })
}

// 新增月卡接口：/parking/card
// 获取月卡信息列表
export function addCardAPI(data) {
  return request({
    url: '/parking/card',
    method: 'POST',
    data
  })
}
// 编辑月卡接口：/parking/card/edit
// 获取月卡信息列表
export function editCardAPI(data) {
  return request({
    url: '/parking/card/edit',
    method: 'PUT',
    data
  })
}
// 删除月卡接口：/parking/card/{ids}
// 获取月卡信息列表(ids必须是一个数组)
export function deleteCardAPI(ids) {
  return request({
    url: '/parking/card/' + ids.join(','),
    method: 'DELETE'
  })
}

// 获取月卡详情接口：/parking/card/detail/{id}
// 获取月卡详情
export function getCardInfoAPI(id) {
  return request({
    url: '/parking/card/detail/' + id
  })
}
